package com.itkaien.anno;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
//        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("AnnotationContext.xml");

        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(config.class);

        Object userService = annotationConfigApplicationContext.getBean("userService");
        System.out.println(userService);
        annotationConfigApplicationContext.close();
    }
}
